\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{array}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\usepackage[margin=2cm]{geometry}
\usepackage{setspace}
\usepackage{natbib}
\usepackage{proof}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{wrapfig}
\usepackage [english]{babel}
\usepackage{grffile}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[tikz]{bclogo}
\usetikzlibrary{chains}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usepackage{lscape}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{pdfpages}
\usepackage{booktabs}
\usepackage{pgfgantt}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\bibliographystyle{apsr}
\bibpunct{(}{)}{;}{a}{,}{,}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\setlength{\tabcolsep}{.18cm}
\usepackage{fancyvrb}
\usepackage{etoc}
\usepackage{sectsty}
\sectionfont{\fontsize{14}{14}\selectfont}
\subsectionfont{\fontsize{12}{12}\selectfont}

% ==Cross Referencing Different Docs
\usepackage{xr}
\externaldocument{EfficacyRole_appendix}

\usepackage{titlesec}

\makeatletter
\@addtoreset{section}{part}
\@addtoreset{figure}{part}
\@addtoreset{table}{part}
\makeatother
\titleformat{\part}[display]
{\normalfont\LARGE\bfseries}{}{0pt}{}

\makeatletter
\renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.6em}}
\renewcommand{\l@subsection}{\@dottedtocline{2}{4.0em}{3.6em}}
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{7.4em}{4.5em}}
\makeatother

% === new commands ===
\newcommand\ud{\mathrm{d}}
\newcommand\dist{\buildrel\rm d\over\sim}
\newcommand\ind{\stackrel{\rm indep.}{\sim}}
\newcommand\iid{\stackrel{\rm i.i.d.}{\sim}}
\newcommand\logit{{\rm logit}}
\renewcommand\r{\right}
\renewcommand\l{\left}
\newcommand\Var{{\rm Var}}
\newcommand\var{{\rm var}}
\newcommand\Cov{{\rm Cov}}
\newcommand\E{\mathbb{E}}
\newcommand\V{\mathbb{V}}
\newcommand\cN{\mathcal{N}}
\newcommand\cS{\mathcal{S}}
\newcommand\cX{\mathcal{X}}
\newcommand\wX{\widetilde{X}}
\newcommand{\diag}{\mathop{\mathrm{diag}}}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\indep}{\mbox{$\perp\!\!\!\perp$}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\DeclareMathOperator{\sgn}{sgn}
\providecommand{\norm}[1]{\lVert#1\rVert}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist 

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{P}[1]{>{\raggedright\tabularxbackslash}p{#1}}

\newcounter{myWeekNum} %for gantt
\stepcounter{myWeekNum}
%
\newcommand{\myWeek}{\themyWeekNum
    \stepcounter{myWeekNum}
    \ifnum\themyWeekNum=53
         \setcounter{myWeekNum}{1}
    \else\fi
}

\newenvironment{bluetext}{\color{blue}}{\ignorespacesafterend}


\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{{\Large \bf README for ``Self-efficacy and Citizen Engagement in Development: Experimental Evidence from Tanzania''}}

\author{Evan Lieberman\thanks{Department of Political Science, MIT. Email: \href{evanlieb@mit.edu}{evanlieb@mit.edu}. Address: 77 Massachusetts Avenue E53-409, Cambridge, MA 02142. Website: \href{https://evanlieberman.org/}{evanlieberman.org}} \hspace{2cm} Yang-Yang Zhou\thanks{Department of Political Science, University of British Columbia. Email: \href{yangyang.zhou@ubc.ca}{yangyang.zhou@ubc.ca}. Address: 323 C.K. Choi Building 1855 West Mall, Vancouver, BC, V6T 1Z2. Website: \href{https://www.yangyangzhou.com/}{yangyangzhou.com}}
}

\date{\today}
\maketitle

\section{Instructions for Replicating All Findings}
To replicate all findings, please follow the instructions below. Since the manuscript and appendix are {\tt .Rnw} files with inline code, recompiling the documents also re-run all of the analyses in the manuscript and appendix. After installing the necessary packages, compilation and replication of all findings should take around 10 minutes.
\begin{enumerate}
\item {\bf Check if the required packages are installed:} Run {\tt install\_required\_packages.R} to check if all required packages are installed. If any are not installed, the script will automatically install them.
\item {\bf Open main analysis file:} in the {\tt paper/} folder, open {\tt EfficacyRole\_JEPS\_final.Rnw} in RStudio. 
	\begin{enumerate}
	\item {\bf Select necessary {\tt knitr} settings:} Once in RStudio, select RStudio -> Preferences -> Sweave from the toolbar. Then, set ``Weave Rnw files using:'' to ``knitr'' in the drop-down menu, and set ``Typeset LaTeX int PDF using:'' to ``XeLaTeX'' in the drop-down menu. Click ``Apply'' at the bottom of the window, and then `OK''.
	\end{enumerate}
\item {\bf Compile main analysis file:} Click ``Compile PDF'' at the top of the RStudio window. This will run all analyses and compile the main manuscript. This should take about 10 minutes. You may run into errors at the final LaTeX compilation stage having to do with citations. This is addressed by pressing ``Compile PDF'' two more times.
\item {\bf Open appendix file:} In the {\tt paper/} folder, open {\tt EfficacyRole\_appendix.Rnw} in RStudio. 
\item {\bf Compile appendix file:} Click ``Compile PDF'' at the top of the RStudio window. This will run all analyses and compile the main manuscript. This should take about a minute. You may run into errors at the final LaTeX compilation stage having to do with citations. This is addressed by pressing ``Compile PDF'' two more times.
\end{enumerate}

\section{Structure of Replication Archive}
In addition to the README and {\tt install\_required\_packages.R}, which is explained above, there are four folders or files in the top level of the replication archive: {\tt code}, {\tt data}, {\tt paper}, and {\tt output}. We provide more detail on the folder structure below.

\begin{enumerate}
\item {\tt paper:} This folder contains the raw {\tt .Rnw} files to run the main paper analyses and build the manuscript ({\tt EfficacyRole\_JEPS\_final.Rnw}), and to run the appendix analyses and build the manuscript ({\tt EfficacyRole\_appendix.Rnw}). For both documents, the code to run all analyses is included inline in the manuscripts. These documents call code stored in the {\tt code} folder, and loads data stored in the {\tt data} folder. All outputted and compiled {\tt pdf} documents will be stored in this folder. Additional files include:
	\begin{enumerate}
	\item {\tt apsr.bst}, {\tt apsr.bst.sty}. {\tt framed.sty:} bibliography style files, called by the {\tt Rnw files}
	\item {\tt efficacyboost.bib:} the main BibTeX file, called by the {\tt Rnw} files
	\item {\tt figure\_inputs:} a folder containing non-analysis figures, such as photographs of the intervention being conducted in the field, visual depictions of the intervention timeline, and visual depictions of the theory
	\end{enumerate}
\item {\tt output:} An empty folder that will store intermediate {\tt .RData} files created when running the models for Figure 3 in the main paper. Since generating these predicted probabilities take a few minutes, we save this output since the appendix relies on these same files for Appendix Figure S10.
\item {\tt code:} A folder containing separate code files, which are each called by the {\tt .Rnw} files. These files are:
	\begin{enumerate}
	\item {\tt VP\_functions.R:} helper functions used throughout the paper for creating predicted probabilities
	\item {\tt VP\_bukoba\_dataclean.R:} data cleaning scripts for Study 1 in Bukoba
	\item {\tt VP\_kilosa\_dataclean.R:} data cleaning scripts for Study 2 in Kilosa
	\item {\tt VP\_bukoba\_qual1\_dataclean.R:} data cleaning scripts for the first qualitative follow-up study in Bukoba
	\item {\tt VP\_bukoba\_qual2\_dataclean.R:} data cleaning scripts for the second qualitative follow-up study in Bukoba
	\end{enumerate}
\item {\tt data:} A folder containing all of the raw data used in the analysis, which are cleaned and prepped by the {\tt \_dataclean.R} scripts in the {\tt code/} folder. The names of the folders containing the raw study data correspond to the four data cleaning scripts. In addition, the {\tt shapefiles} folder contains raw shapefiles used in the appendix to illustrate the study sites.
\end{enumerate}


\section{OS, R, and Package Version Information}
This analysis was compiled using R version 3.6.0, on a Mac OSX running macOS Catalina 10.15.7. Additional information on the computing environment, and exact package versions, can be found below.
\begin{verbatim}
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/
vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] psych_1.8.12        patchwork_1.0.0     ggmap_3.0.0.901     maptools_0.9-5     
 [5] mapdata_2.3.0       maps_3.3.0          rgdal_1.4-8         spdep_1.1-5        
 [9] sf_0.9-5            spData_0.3.8        sp_1.4-2            equivalence_0.7.2  
[13] PairedData_1.1.1    mvtnorm_1.0-11      gld_2.6             boot_1.3-22        
[17] corrplot_0.84       lattice_0.20-38     xtable_1.8-4        texreg_1.37.7      
[21] stargazer_5.2.2     gridExtra_2.3       forcats_0.4.0       stringr_1.4.0      
[25] dplyr_1.0.0         purrr_0.3.4         readr_1.3.1         tidyr_1.0.2        
[29] tibble_3.0.3        ggplot2_3.3.2       tidyverse_1.2.1     estimatr_0.18.0    
[33] scales_1.1.1        CBPS_0.21           glmnet_2.0-18       foreach_1.5.0      
[37] Matrix_1.2-17       numDeriv_2016.8-1.1 nnet_7.3-12         MatchIt_3.0.2      
[41] MASS_7.3-51.4      

loaded via a namespace (and not attached):
 [1] nlme_3.1-139        bitops_1.0-6        lubridate_1.7.8     gmodels_2.18.1     
 [5] httr_1.4.2          tools_3.6.0         backports_1.1.8     R6_2.5.0           
 [9] KernSmooth_2.23-15  DBI_1.1.0           colorspace_1.4-1    raster_3.3-7       
[13] withr_2.2.0         mnormt_1.5-5        tidyselect_1.1.0    compiler_3.6.0     
[17] cli_2.0.2           rvest_0.3.4         expm_0.999-4        xml2_1.3.2         
[21] classInt_0.4-3      foreign_0.8-71      jpeg_0.1-8.1        pkgconfig_2.0.3    
[25] rlang_0.4.7         readxl_1.3.1        rstudioapi_0.11     generics_0.0.2     
[29] jsonlite_1.7.1      gtools_3.8.2        magrittr_1.5        Formula_1.2-3      
[33] Rcpp_1.0.5          munsell_0.5.0       fansi_0.4.1         lifecycle_0.2.0    
[37] stringi_1.4.6       plyr_1.8.6          grid_3.6.0          parallel_3.6.0     
[41] gdata_2.18.0        crayon_1.3.4        lmom_2.8            deldir_0.1-28      
[45] haven_2.2.0         splines_3.6.0       hms_0.5.3           pillar_1.4.6       
[49] rjson_0.2.20        codetools_0.2-16    LearnBayes_2.15.1   glue_1.4.1         
[53] modelr_0.1.4        png_0.1-7           vctrs_0.3.2         RgoogleMaps_1.4.5.3
[57] cellranger_1.1.0    gtable_0.3.0        assertthat_0.2.1    broom_0.7.0        
[61] e1071_1.7-3         coda_0.19-3         class_7.3-15        iterators_1.0.12   
[65] units_0.6-7         ellipsis_0.3.1     
\end{verbatim}

\end{document}